-- GENERATED SPELL FOR [Obsidia] --


function spell0_23282(pUnit, Event) --@Bellowing Roar,Self--
pUnit:FullCastSpellOnTarget(36922,pUnit)
pUnit:RegisterEvent('Sorts_23282', 6500, 1)
end

function spell1_23282(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40505,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23282', 513, 1)
end

function spell2_23282(pUnit, Event) --@Fiery Breath,n/a--
pUnit:FullCastSpellOnTarget(40032,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23282', 581, 1)
end

function spell3_23282(pUnit, Event) --@Flame Breath,n/a--
pUnit:FullCastSpellOnTarget(9573,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23282', 2000, 1)
end

function spell4_23282(pUnit, Event) --@Hellfire,Self--
pUnit:FullCastSpellOnTarget(40717,pUnit)
pUnit:RegisterEvent('Sorts_23282', 6000, 1)
end

function Sorts_23282(pUnit, Event)
local choix_sorts_23282 = math.random(0, 4)
if choix_sorts_23282 == 0 then
pUnit:RegisterEvent('spell0_23282', 1, 1)
end
if choix_sorts_23282 == 1 then
pUnit:RegisterEvent('spell1_23282', 1, 1)
end
if choix_sorts_23282 == 2 then
pUnit:RegisterEvent('spell2_23282', 1, 1)
end
if choix_sorts_23282 == 3 then
pUnit:RegisterEvent('spell3_23282', 1, 1)
end
if choix_sorts_23282 == 4 then
pUnit:RegisterEvent('spell4_23282', 1, 1)
end
end

function mob23282_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23282', math.random(1500, 3000), 1)
end

function mob23282_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23282_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23282_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23282, 1, 'mob23282_Action')
RegisterUnitEvent(23282, 2, 'mob23282_Leave')
RegisterUnitEvent(23282, 3, 'mob23282_Kill')
RegisterUnitEvent(23282, 4, 'mob23282_Die')
